-- GENERATED SPELL FOR [Magister Keldonus] --


function spell0_26828(pUnit, Event) --@Arcane Blast,n/a--
pUnit:FullCastSpellOnTarget(51830,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26828', 512, 1)
end

function spell1_26828(pUnit, Event) --@Fury of the Blue,n/a--
pUnit:FullCastSpellOnTarget(51808,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26828', 6000, 1)
end

function spell2_26828(pUnit, Event) --@Might of Malygos,Self--
pUnit:FullCastSpellOnTarget(51800,pUnit)
pUnit:RegisterEvent('Sorts_26828', 582, 1)
end

function spell3_26828(pUnit, Event) --@Power Flux,Self--
pUnit:FullCastSpellOnTarget(51806,pUnit)
pUnit:RegisterEvent('Sorts_26828', 3000, 1)
end

function spell4_26828(pUnit, Event) --@Power Siphon,n/a--
pUnit:FullCastSpellOnTarget(51804,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26828', 20284, 1)
end

function Sorts_26828(pUnit, Event)
local choix_sorts_26828 = math.random(0, 4)
if choix_sorts_26828 == 0 then
pUnit:RegisterEvent('spell0_26828', 1, 1)
end
if choix_sorts_26828 == 1 then
pUnit:RegisterEvent('spell1_26828', 1, 1)
end
if choix_sorts_26828 == 2 then
pUnit:RegisterEvent('spell2_26828', 1, 1)
end
if choix_sorts_26828 == 3 then
pUnit:RegisterEvent('spell3_26828', 1, 1)
end
if choix_sorts_26828 == 4 then
pUnit:RegisterEvent('spell4_26828', 1, 1)
end
end

function mob26828_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26828', math.random(1500, 3000), 1)
end

function mob26828_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26828_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26828_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26828, 1, 'mob26828_Action')
RegisterUnitEvent(26828, 2, 'mob26828_Leave')
RegisterUnitEvent(26828, 3, 'mob26828_Kill')
RegisterUnitEvent(26828, 4, 'mob26828_Die')
